/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.unmsm.cinfo.siga.datos;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author alumno
 */
@Embeddable
public class AulaOcupadaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "AUL_COD")
    private int aulCod;
    @Basic(optional = false)
    @Column(name = "AULD_FECH")
    @Temporal(TemporalType.DATE)
    private Date auldFech;

    public AulaOcupadaPK() {
    }

    public AulaOcupadaPK(int aulCod, Date auldFech) {
        this.aulCod = aulCod;
        this.auldFech = auldFech;
    }

    public int getAulCod() {
        return aulCod;
    }

    public void setAulCod(int aulCod) {
        this.aulCod = aulCod;
    }

    public Date getAuldFech() {
        return auldFech;
    }

    public void setAuldFech(Date auldFech) {
        this.auldFech = auldFech;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) aulCod;
        hash += (auldFech != null ? auldFech.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AulaOcupadaPK)) {
            return false;
        }
        AulaOcupadaPK other = (AulaOcupadaPK) object;
        if (this.aulCod != other.aulCod) {
            return false;
        }
        if ((this.auldFech == null && other.auldFech != null) || (this.auldFech != null && !this.auldFech.equals(other.auldFech))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.edu.unmsm.cinfo.siga.datos.AulaOcupadaPK[ aulCod=" + aulCod + ", auldFech=" + auldFech + " ]";
    }
    
}
